{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "1491964f",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from datetime import timedelta\n",
    "from tqdm import tqdm\n",
    "import matplotlib.pyplot as plt\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "728bfa03",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 任务1：Pandas数据读取、保存和数据类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "491149e2",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "数据一共有800行\n",
      "数据一共有12列\n",
      "---------- 缺失值个数 ----------\n",
      "Name            0\n",
      "Type 1          0\n",
      "Type 2        386\n",
      "Total           0\n",
      "HP              0\n",
      "Attack          0\n",
      "Defense         0\n",
      "Sp. Atk         0\n",
      "Sp. Def         0\n",
      "Speed           0\n",
      "Generation      0\n",
      "Legendary       0\n",
      "dtype: int64\n"
     ]
    }
   ],
   "source": [
    "# 读取数据\n",
    "df = pd.read_csv('https://cdn.coggle.club/Pokemon.csv')\n",
    "# 保存数据\n",
    "df.to_csv('Pokemon.csv', index=False)\n",
    "# 统计数据\n",
    "print('数据一共有{}行'.format(len(df)))\n",
    "print('数据一共有{}列'.format(len(df.columns)))\n",
    "print('-'*10,'缺失值个数','-'*10)\n",
    "print(df.isna().sum())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "f803b9dc",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Name</th>\n",
       "      <th>Type 1</th>\n",
       "      <th>Type 2</th>\n",
       "      <th>Total</th>\n",
       "      <th>HP</th>\n",
       "      <th>Attack</th>\n",
       "      <th>Defense</th>\n",
       "      <th>Sp. Atk</th>\n",
       "      <th>Sp. Def</th>\n",
       "      <th>Speed</th>\n",
       "      <th>Generation</th>\n",
       "      <th>Legendary</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Bulbasaur</td>\n",
       "      <td>Grass</td>\n",
       "      <td>Poison</td>\n",
       "      <td>318</td>\n",
       "      <td>45</td>\n",
       "      <td>49</td>\n",
       "      <td>49</td>\n",
       "      <td>65</td>\n",
       "      <td>65</td>\n",
       "      <td>45</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Ivysaur</td>\n",
       "      <td>Grass</td>\n",
       "      <td>Poison</td>\n",
       "      <td>405</td>\n",
       "      <td>60</td>\n",
       "      <td>62</td>\n",
       "      <td>63</td>\n",
       "      <td>80</td>\n",
       "      <td>80</td>\n",
       "      <td>60</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Venusaur</td>\n",
       "      <td>Grass</td>\n",
       "      <td>Poison</td>\n",
       "      <td>525</td>\n",
       "      <td>80</td>\n",
       "      <td>82</td>\n",
       "      <td>83</td>\n",
       "      <td>100</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>VenusaurMega Venusaur</td>\n",
       "      <td>Grass</td>\n",
       "      <td>Poison</td>\n",
       "      <td>625</td>\n",
       "      <td>80</td>\n",
       "      <td>100</td>\n",
       "      <td>123</td>\n",
       "      <td>122</td>\n",
       "      <td>120</td>\n",
       "      <td>80</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Charmander</td>\n",
       "      <td>Fire</td>\n",
       "      <td>NaN</td>\n",
       "      <td>309</td>\n",
       "      <td>39</td>\n",
       "      <td>52</td>\n",
       "      <td>43</td>\n",
       "      <td>60</td>\n",
       "      <td>50</td>\n",
       "      <td>65</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>795</th>\n",
       "      <td>Diancie</td>\n",
       "      <td>Rock</td>\n",
       "      <td>Fairy</td>\n",
       "      <td>600</td>\n",
       "      <td>50</td>\n",
       "      <td>100</td>\n",
       "      <td>150</td>\n",
       "      <td>100</td>\n",
       "      <td>150</td>\n",
       "      <td>50</td>\n",
       "      <td>6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>796</th>\n",
       "      <td>DiancieMega Diancie</td>\n",
       "      <td>Rock</td>\n",
       "      <td>Fairy</td>\n",
       "      <td>700</td>\n",
       "      <td>50</td>\n",
       "      <td>160</td>\n",
       "      <td>110</td>\n",
       "      <td>160</td>\n",
       "      <td>110</td>\n",
       "      <td>110</td>\n",
       "      <td>6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>797</th>\n",
       "      <td>HoopaHoopa Confined</td>\n",
       "      <td>Psychic</td>\n",
       "      <td>Ghost</td>\n",
       "      <td>600</td>\n",
       "      <td>80</td>\n",
       "      <td>110</td>\n",
       "      <td>60</td>\n",
       "      <td>150</td>\n",
       "      <td>130</td>\n",
       "      <td>70</td>\n",
       "      <td>6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>798</th>\n",
       "      <td>HoopaHoopa Unbound</td>\n",
       "      <td>Psychic</td>\n",
       "      <td>Dark</td>\n",
       "      <td>680</td>\n",
       "      <td>80</td>\n",
       "      <td>160</td>\n",
       "      <td>60</td>\n",
       "      <td>170</td>\n",
       "      <td>130</td>\n",
       "      <td>80</td>\n",
       "      <td>6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>799</th>\n",
       "      <td>Volcanion</td>\n",
       "      <td>Fire</td>\n",
       "      <td>Water</td>\n",
       "      <td>600</td>\n",
       "      <td>80</td>\n",
       "      <td>110</td>\n",
       "      <td>120</td>\n",
       "      <td>130</td>\n",
       "      <td>90</td>\n",
       "      <td>70</td>\n",
       "      <td>6</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>800 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                      Name   Type 1  Type 2  Total  HP  Attack  Defense  \\\n",
       "0                Bulbasaur    Grass  Poison    318  45      49       49   \n",
       "1                  Ivysaur    Grass  Poison    405  60      62       63   \n",
       "2                 Venusaur    Grass  Poison    525  80      82       83   \n",
       "3    VenusaurMega Venusaur    Grass  Poison    625  80     100      123   \n",
       "4               Charmander     Fire     NaN    309  39      52       43   \n",
       "..                     ...      ...     ...    ...  ..     ...      ...   \n",
       "795                Diancie     Rock   Fairy    600  50     100      150   \n",
       "796    DiancieMega Diancie     Rock   Fairy    700  50     160      110   \n",
       "797    HoopaHoopa Confined  Psychic   Ghost    600  80     110       60   \n",
       "798     HoopaHoopa Unbound  Psychic    Dark    680  80     160       60   \n",
       "799              Volcanion     Fire   Water    600  80     110      120   \n",
       "\n",
       "     Sp. Atk  Sp. Def  Speed  Generation  Legendary  \n",
       "0         65       65     45           1      False  \n",
       "1         80       80     60           1      False  \n",
       "2        100      100     80           1      False  \n",
       "3        122      120     80           1      False  \n",
       "4         60       50     65           1      False  \n",
       "..       ...      ...    ...         ...        ...  \n",
       "795      100      150     50           6       True  \n",
       "796      160      110    110           6       True  \n",
       "797      150      130     70           6       True  \n",
       "798      170      130     80           6       True  \n",
       "799      130       90     70           6       True  \n",
       "\n",
       "[800 rows x 12 columns]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a9119a4d",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 任务2：Pandas数据位置索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "3882195e",
   "metadata": {
    "hidden": true,
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Total</th>\n",
       "      <th>HP</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>405</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>530</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>630</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>195</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>205</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>395</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>195</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>205</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>395</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>495</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>251</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>349</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>479</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>579</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>253</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>413</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>262</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>442</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>288</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>438</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>320</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>485</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>300</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>450</td>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>275</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>365</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>505</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>273</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>365</td>\n",
       "      <td>61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>505</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Total  HP\n",
       "10    405  59\n",
       "11    530  79\n",
       "12    630  79\n",
       "13    195  45\n",
       "14    205  50\n",
       "15    395  60\n",
       "16    195  40\n",
       "17    205  45\n",
       "18    395  65\n",
       "19    495  65\n",
       "20    251  40\n",
       "21    349  63\n",
       "22    479  83\n",
       "23    579  83\n",
       "24    253  30\n",
       "25    413  55\n",
       "26    262  40\n",
       "27    442  65\n",
       "28    288  35\n",
       "29    438  60\n",
       "30    320  35\n",
       "31    485  60\n",
       "32    300  50\n",
       "33    450  75\n",
       "34    275  55\n",
       "35    365  70\n",
       "36    505  90\n",
       "37    273  46\n",
       "38    365  61\n",
       "39    505  81"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('https://cdn.coggle.club/Pokemon.csv')\n",
    "# 选择出Total列\n",
    "total = df['Total']\n",
    "# 选择出Total列和HP列\n",
    "total_hp_df = df[['Total','HP']]\n",
    "# 选择出第10-40行数据\n",
    "df_10_40 = df.iloc[10:40] \n",
    "# 选择出第10-40行的Total列和HP列\n",
    "total_hp_df_10_40 = df[['Total','HP']].iloc[10:40] \n",
    "total_hp_df_10_40"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "88c59bc6",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 任务3：Pandas数据逻辑索引\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "594c88e6",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Name</th>\n",
       "      <th>Type 1</th>\n",
       "      <th>Type 2</th>\n",
       "      <th>Total</th>\n",
       "      <th>HP</th>\n",
       "      <th>Attack</th>\n",
       "      <th>Defense</th>\n",
       "      <th>Sp. Atk</th>\n",
       "      <th>Sp. Def</th>\n",
       "      <th>Speed</th>\n",
       "      <th>Generation</th>\n",
       "      <th>Legendary</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Venusaur</td>\n",
       "      <td>Grass</td>\n",
       "      <td>Poison</td>\n",
       "      <td>525</td>\n",
       "      <td>80</td>\n",
       "      <td>82</td>\n",
       "      <td>83</td>\n",
       "      <td>100</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>VenusaurMega Venusaur</td>\n",
       "      <td>Grass</td>\n",
       "      <td>Poison</td>\n",
       "      <td>625</td>\n",
       "      <td>80</td>\n",
       "      <td>100</td>\n",
       "      <td>123</td>\n",
       "      <td>122</td>\n",
       "      <td>120</td>\n",
       "      <td>80</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Charmeleon</td>\n",
       "      <td>Fire</td>\n",
       "      <td>NaN</td>\n",
       "      <td>405</td>\n",
       "      <td>58</td>\n",
       "      <td>64</td>\n",
       "      <td>58</td>\n",
       "      <td>80</td>\n",
       "      <td>65</td>\n",
       "      <td>80</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>168</th>\n",
       "      <td>Meganium</td>\n",
       "      <td>Grass</td>\n",
       "      <td>NaN</td>\n",
       "      <td>525</td>\n",
       "      <td>80</td>\n",
       "      <td>82</td>\n",
       "      <td>100</td>\n",
       "      <td>83</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "      <td>2</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>170</th>\n",
       "      <td>Quilava</td>\n",
       "      <td>Fire</td>\n",
       "      <td>NaN</td>\n",
       "      <td>405</td>\n",
       "      <td>58</td>\n",
       "      <td>64</td>\n",
       "      <td>58</td>\n",
       "      <td>80</td>\n",
       "      <td>65</td>\n",
       "      <td>80</td>\n",
       "      <td>2</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>203</th>\n",
       "      <td>Skiploom</td>\n",
       "      <td>Grass</td>\n",
       "      <td>Flying</td>\n",
       "      <td>340</td>\n",
       "      <td>55</td>\n",
       "      <td>45</td>\n",
       "      <td>50</td>\n",
       "      <td>45</td>\n",
       "      <td>65</td>\n",
       "      <td>80</td>\n",
       "      <td>2</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>259</th>\n",
       "      <td>Magby</td>\n",
       "      <td>Fire</td>\n",
       "      <td>NaN</td>\n",
       "      <td>365</td>\n",
       "      <td>45</td>\n",
       "      <td>75</td>\n",
       "      <td>37</td>\n",
       "      <td>70</td>\n",
       "      <td>55</td>\n",
       "      <td>83</td>\n",
       "      <td>2</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>278</th>\n",
       "      <td>Blaziken</td>\n",
       "      <td>Fire</td>\n",
       "      <td>Fighting</td>\n",
       "      <td>530</td>\n",
       "      <td>80</td>\n",
       "      <td>120</td>\n",
       "      <td>70</td>\n",
       "      <td>110</td>\n",
       "      <td>70</td>\n",
       "      <td>80</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>Shiftry</td>\n",
       "      <td>Grass</td>\n",
       "      <td>Dark</td>\n",
       "      <td>480</td>\n",
       "      <td>90</td>\n",
       "      <td>100</td>\n",
       "      <td>60</td>\n",
       "      <td>90</td>\n",
       "      <td>60</td>\n",
       "      <td>80</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>436</th>\n",
       "      <td>Monferno</td>\n",
       "      <td>Fire</td>\n",
       "      <td>Fighting</td>\n",
       "      <td>405</td>\n",
       "      <td>64</td>\n",
       "      <td>78</td>\n",
       "      <td>52</td>\n",
       "      <td>78</td>\n",
       "      <td>52</td>\n",
       "      <td>81</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>468</th>\n",
       "      <td>Cherrim</td>\n",
       "      <td>Grass</td>\n",
       "      <td>NaN</td>\n",
       "      <td>450</td>\n",
       "      <td>70</td>\n",
       "      <td>60</td>\n",
       "      <td>70</td>\n",
       "      <td>87</td>\n",
       "      <td>78</td>\n",
       "      <td>85</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>518</th>\n",
       "      <td>Magmortar</td>\n",
       "      <td>Fire</td>\n",
       "      <td>NaN</td>\n",
       "      <td>540</td>\n",
       "      <td>75</td>\n",
       "      <td>95</td>\n",
       "      <td>67</td>\n",
       "      <td>125</td>\n",
       "      <td>95</td>\n",
       "      <td>83</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>542</th>\n",
       "      <td>Heatran</td>\n",
       "      <td>Fire</td>\n",
       "      <td>Steel</td>\n",
       "      <td>600</td>\n",
       "      <td>91</td>\n",
       "      <td>90</td>\n",
       "      <td>106</td>\n",
       "      <td>130</td>\n",
       "      <td>106</td>\n",
       "      <td>77</td>\n",
       "      <td>4</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>555</th>\n",
       "      <td>Servine</td>\n",
       "      <td>Grass</td>\n",
       "      <td>NaN</td>\n",
       "      <td>413</td>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "      <td>75</td>\n",
       "      <td>60</td>\n",
       "      <td>75</td>\n",
       "      <td>83</td>\n",
       "      <td>5</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>722</th>\n",
       "      <td>Braixen</td>\n",
       "      <td>Fire</td>\n",
       "      <td>NaN</td>\n",
       "      <td>409</td>\n",
       "      <td>59</td>\n",
       "      <td>59</td>\n",
       "      <td>58</td>\n",
       "      <td>90</td>\n",
       "      <td>70</td>\n",
       "      <td>73</td>\n",
       "      <td>6</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>730</th>\n",
       "      <td>Fletchinder</td>\n",
       "      <td>Fire</td>\n",
       "      <td>Flying</td>\n",
       "      <td>382</td>\n",
       "      <td>62</td>\n",
       "      <td>73</td>\n",
       "      <td>55</td>\n",
       "      <td>56</td>\n",
       "      <td>52</td>\n",
       "      <td>84</td>\n",
       "      <td>6</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>735</th>\n",
       "      <td>Litleo</td>\n",
       "      <td>Fire</td>\n",
       "      <td>Normal</td>\n",
       "      <td>369</td>\n",
       "      <td>62</td>\n",
       "      <td>50</td>\n",
       "      <td>58</td>\n",
       "      <td>73</td>\n",
       "      <td>54</td>\n",
       "      <td>72</td>\n",
       "      <td>6</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                      Name Type 1    Type 2  Total  HP  Attack  Defense  \\\n",
       "2                 Venusaur  Grass    Poison    525  80      82       83   \n",
       "3    VenusaurMega Venusaur  Grass    Poison    625  80     100      123   \n",
       "5               Charmeleon   Fire       NaN    405  58      64       58   \n",
       "168               Meganium  Grass       NaN    525  80      82      100   \n",
       "170                Quilava   Fire       NaN    405  58      64       58   \n",
       "203               Skiploom  Grass    Flying    340  55      45       50   \n",
       "259                  Magby   Fire       NaN    365  45      75       37   \n",
       "278               Blaziken   Fire  Fighting    530  80     120       70   \n",
       "298                Shiftry  Grass      Dark    480  90     100       60   \n",
       "436               Monferno   Fire  Fighting    405  64      78       52   \n",
       "468                Cherrim  Grass       NaN    450  70      60       70   \n",
       "518              Magmortar   Fire       NaN    540  75      95       67   \n",
       "542                Heatran   Fire     Steel    600  91      90      106   \n",
       "555                Servine  Grass       NaN    413  60      60       75   \n",
       "722                Braixen   Fire       NaN    409  59      59       58   \n",
       "730            Fletchinder   Fire    Flying    382  62      73       55   \n",
       "735                 Litleo   Fire    Normal    369  62      50       58   \n",
       "\n",
       "     Sp. Atk  Sp. Def  Speed  Generation  Legendary  \n",
       "2        100      100     80           1      False  \n",
       "3        122      120     80           1      False  \n",
       "5         80       65     80           1      False  \n",
       "168       83      100     80           2      False  \n",
       "170       80       65     80           2      False  \n",
       "203       45       65     80           2      False  \n",
       "259       70       55     83           2      False  \n",
       "278      110       70     80           3      False  \n",
       "298       90       60     80           3      False  \n",
       "436       78       52     81           4      False  \n",
       "468       87       78     85           4      False  \n",
       "518      125       95     83           4      False  \n",
       "542      130      106     77           4       True  \n",
       "555       60       75     83           5      False  \n",
       "722       90       70     73           6      False  \n",
       "730       56       52     84           6      False  \n",
       "735       73       54     72           6      False  "
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('https://cdn.coggle.club/Pokemon.csv')\n",
    "# 筛选出Type 1 为 Grass的数据\n",
    "type_grass_df = df[df['Type 1']=='Grass']\n",
    "# 筛选出Type 1 为 Grass的数据 且 Type 2 为 Poison的数据\n",
    "type_grass_poison_df = df[(df['Type 1']=='Grass') & (df['Type 2']=='Poison')]\n",
    "# 筛选出HP大于50 或 Speed小于90的数据\n",
    "hp_50_speed_90_df = df[(df['HP']>50) | (df['Speed']<90)]\n",
    "# 筛选出Type 1 取值为Grass 或 Fire，且 HP 位于 70 与 90之间，且 Speed以数字8开头的数据\n",
    "typ_grass_fire_hp_70_90_df = df[df['Type 1'].isin(['Grass','Fire']) & ((df['Speed']>70)&(df['Speed']<90))]\n",
    "typ_grass_fire_hp_70_90_df"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "52ec4a53",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 任务4：Pandas数据分组聚合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "cbc4bb62",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Type 1</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Bug</th>\n",
       "      <td>56.884058</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Dark</th>\n",
       "      <td>66.806452</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Dragon</th>\n",
       "      <td>83.312500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Electric</th>\n",
       "      <td>59.795455</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fairy</th>\n",
       "      <td>74.117647</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fighting</th>\n",
       "      <td>69.851852</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fire</th>\n",
       "      <td>69.903846</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Flying</th>\n",
       "      <td>70.750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ghost</th>\n",
       "      <td>64.437500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grass</th>\n",
       "      <td>67.271429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ground</th>\n",
       "      <td>73.781250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ice</th>\n",
       "      <td>72.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Normal</th>\n",
       "      <td>77.275510</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Poison</th>\n",
       "      <td>67.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Psychic</th>\n",
       "      <td>70.631579</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Rock</th>\n",
       "      <td>65.363636</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Steel</th>\n",
       "      <td>65.222222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Water</th>\n",
       "      <td>72.062500</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               mean\n",
       "Type 1             \n",
       "Bug       56.884058\n",
       "Dark      66.806452\n",
       "Dragon    83.312500\n",
       "Electric  59.795455\n",
       "Fairy     74.117647\n",
       "Fighting  69.851852\n",
       "Fire      69.903846\n",
       "Flying    70.750000\n",
       "Ghost     64.437500\n",
       "Grass     67.271429\n",
       "Ground    73.781250\n",
       "Ice       72.000000\n",
       "Normal    77.275510\n",
       "Poison    67.250000\n",
       "Psychic   70.631579\n",
       "Rock      65.363636\n",
       "Steel     65.222222\n",
       "Water     72.062500"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('https://cdn.coggle.club/Pokemon.csv')\n",
    "# groupby统计分组均值\n",
    "df_group = df.groupby('Type 1')['HP'].mean()\n",
    "# agg统计分组均值\n",
    "df_agg = df.groupby('Type 1')['HP'].agg(['mean'])\n",
    "# transform统计分组均值\n",
    "df_transform = df.groupby('Type 1')['HP'].transform('mean')\n",
    "df_agg"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f48109ea",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 任务5：Pandas日期数据处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "f1aac41b",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>dt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-11-30 19:14:16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2021-11-30 19:14:17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2021-11-30 19:14:18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2021-11-30 19:14:19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2021-11-30 19:14:20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19995</th>\n",
       "      <td>2021-12-01 00:47:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19996</th>\n",
       "      <td>2021-12-01 00:47:32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19997</th>\n",
       "      <td>2021-12-01 00:47:33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19998</th>\n",
       "      <td>2021-12-01 00:47:34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19999</th>\n",
       "      <td>2021-12-01 00:47:35</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20000 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                       dt\n",
       "0     2021-11-30 19:14:16\n",
       "1     2021-11-30 19:14:17\n",
       "2     2021-11-30 19:14:18\n",
       "3     2021-11-30 19:14:19\n",
       "4     2021-11-30 19:14:20\n",
       "...                   ...\n",
       "19995 2021-12-01 00:47:31\n",
       "19996 2021-12-01 00:47:32\n",
       "19997 2021-12-01 00:47:33\n",
       "19998 2021-12-01 00:47:34\n",
       "19999 2021-12-01 00:47:35\n",
       "\n",
       "[20000 rows x 1 columns]"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 创建dt列\n",
    "df = pd.DataFrame(range(1638263656,1638283656),columns=['dt'])\n",
    "# 将dt列转为datatime格式\n",
    "df['dt'] = pd.to_datetime(df['dt'], unit='s')\n",
    "# 筛选出dt列中小时为10的行\n",
    "hour_10_df = df[df['dt'].dt.hour == 10]\n",
    "# 将dt列整体增加8小时的时间\n",
    "df['dt'] = df['dt'] + timedelta(hours=10)\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "756e2005",
   "metadata": {},
   "source": [
    "# 任务6：Pandas缺失值处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "8cd11999",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Name            0\n",
       "Type 1          0\n",
       "Type 2        386\n",
       "Total           0\n",
       "HP              0\n",
       "Attack          0\n",
       "Defense         0\n",
       "Sp. Atk         0\n",
       "Sp. Def         0\n",
       "Speed           0\n",
       "Generation      0\n",
       "Legendary       0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('https://cdn.coggle.club/Pokemon.csv')\n",
    "# 查看空值统计\n",
    "df.isna().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "19151119",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Flying      483\n",
       "Ground       35\n",
       "Poison       34\n",
       "Psychic      33\n",
       "Fighting     26\n",
       "Grass        25\n",
       "Fairy        23\n",
       "Steel        22\n",
       "Dark         20\n",
       "Dragon       18\n",
       "Ice          14\n",
       "Ghost        14\n",
       "Water        14\n",
       "Rock         14\n",
       "Fire         12\n",
       "Electric      6\n",
       "Normal        4\n",
       "Bug           3\n",
       "Name: Type 2, dtype: int64"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看Type 2值的分布情况\n",
    "df['Type 2'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "6716629c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Name          0\n",
       "Type 1        0\n",
       "Type 2        0\n",
       "Total         0\n",
       "HP            0\n",
       "Attack        0\n",
       "Defense       0\n",
       "Sp. Atk       0\n",
       "Sp. Def       0\n",
       "Speed         0\n",
       "Generation    0\n",
       "Legendary     0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 分类数据，暂采用纵数填充\n",
    "df['Type 2'].fillna(df['Type 2'].mode()[0], inplace=True)\n",
    "df.isna().sum()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0c9bce6e",
   "metadata": {},
   "source": [
    "# 任务7：Pandas数据可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "id": "b6e27ce2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEkCAYAAADU2nGnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAshElEQVR4nO3deZgcZbn///cne1hlGfgBEROUncSAiSIgcA4KCLIcEEVEAoqIshg8IOAGrj8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IgYNGsSECROYOHEiAwb0XAc66aSTuOaaa9hrr70488wzywrZrClO7maZ4cOHM2vWLAAWLFjAIYccwsKFC/n617/e43HnnXce7e3tDB06dAVEadYYN8uY1bHeeusxadIkzj77bCKCJUuWcNJJJzF+/HjGjBnDeeedB8C+++7Lyy+/zHve8x6mTp1Ke3s7Bx54IOPHj2f8+PHcfvvtAJx++ul88pOfZNddd2WTTTbhJz/5CQAvv/wye++9N+985zvZZpttmDp1KgAzZ85kl1124V3vehd77LEH8+fP75sXwvot19zNurHJJpvwxhtvsGDBAqZPn86aa67JX/7yF1577TV23HFHdt99d66++mpWW221zhr/IYccwgknnMBOO+3Ek08+yR577MHcuXMBeOihh7j55pt58cUX2XzzzfnsZz/LH/7wBzbccMPOdd0XLlzIokWLOO6445g+fTptbW1MnTqVL3/5y1x00UV99VJYP+TkbtaDjuU5rrvuOu6//36mTZsGpCT8yCOPdC7x2+GGG27gwQcf7Nx+4YUXOhca23vvvRk6dChDhw5lvfXW4+mnn2b06NGceOKJnHzyyXzoQx/ife97H3PmzGHOnDmda70vWbKEDTbYYEX8uVYhTu5m3XjssccYOHAg6623HhHBWWedxR577NHjMW+88QZ33nknw4cPf9NjtW3yAwcOZPHixWy22WbMnDmTa665hlNPPZXdd9+d//qv/2LrrbfmzjvvLP1vspWH29zN6mhvb+foo4/m2GOPRRJ77LEH55xzDosWLQLgr3/9Ky+//PKbjuu61G9Hc013nnrqKVZZZRUOPfRQTjzxRO655x4233xz2tvbO5P7okWLeOCBB8r742yl4Jq7taTeXEmvO6+88gpjx47tHAr5iU98gi984QsAHHnkkTzxxBNst912RARtbW1cddVVbyrjJz/5Cccccwxjxoxh8eLF7Lzzzpx77rnd/s7Zs2dz0kknMWDAAAYPHsw555zDkCFDmDZtGscffzwLFy5k8eLFTJw4cbl3hTKr5SV/i/KqkKXy8rX5+TVrXa2w5K+bZczMKsjJ3cysgpab3CVdJGmBpDk1+9aWdL2kR7Lva9U8dqqkRyU9LKnnoQVmNVqhibC/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ain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df = pd.read_csv('https://cdn.coggle.club/Pokemon.csv')\n",
    "group_df = df.groupby('Type 1')\n",
    "group_df[['HP','Attack','Defense']].mean().plot(kind=\"bar\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "cefeb1f5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEGCAYAAACKB4k+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAABFS0lEQVR4nO29e3xU1bn//3n2ngsQ7kkMBAIEg/gNtyipQhEq0uJREewRqLaUntP2aM9PTq29gNaiVo+nR7z9avXXVq3f1mpVhFYUa7WKiiioQcMtCkRuCZcA4ZZwmWRmnt8fc2Fm9lqT2clMZjLzvF+vQLJm7bWftXeyn73WcyNmhiAIgiAAgJFuAQRBEITMQZSCIAiCEEaUgiAIghBGlIIgCIIQRpSCIAiCEMaRbgE6QkFBAQ8bNizdYgiCIHQp1q9ff5iZC1WfdWmlMGzYMFRVVaVbDEEQhC4FEe3WfSbbR4IgCEIYUQqCIAhCGFEKgiAIQhhRCoIgCEIYUQqCIAhCGFEKQs7Q2OzBhrpjaGz2pFsUQchYurRLqiAkyorqvVi0fCOchoFWvx9Lrh2LmRWD0i2WIGQcslIQsp7GZg8WLd+IM61+NHm8ONPqx8LlG2XFIAgKRCkIWU/90dNwGtG/6k7DQP3R02mSSBAyF1EKQtYzuF93tPr9UW2tfj8G9+ueJokEIXMRpSBkPfk93Vhy7Vh0cxro5Xagm9PAkmvHIr+nO92iCULGIYZmoVNpbPag/uhpDO7XvVMfyjMrBmFSWUFazi0IXQlRCkKnkW4PoPye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Qc8/O/EdGjwe8js11uJqKZ6ZFSEBJDlIIgpJ6HmbkCwBwATxGR/N0JGYv8cgpCJ8HMnwHwAihItyyCoMORbgEEIQvoTkTVET/3hyJ9ChFdDMAP4FAnySUIthGlIAgd53RwewhAwKYAoDLi81uIaB6AJgDfYEkjIGQwohQEIfU8zMwPpFsIQUgEsSkIgiAIYUQpCIIgCGEkS6ogCIIQRlYKgiAIQhhRCoIgCEIYUQqCIAhCGFEKgiAIQhhRCoIgCEIYUQqCIAhCGFEKgiAIQpj/H3pAlo4YdVKSAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.plot(kind=\"scatter\", x=\"HP\", y=\"Attack\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "259e07c1",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 任务8：Pandas多表合并和聚合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "5bd85b13",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "data1 = pd.DataFrame({\"ID\":range(101, 106),                                \n",
    "                      \"x1\":range(1, 6),                      \n",
    "                      \"x2\":[\"a\", \"b\", \"c\", \"d\", \"e\"],                     \n",
    "                      \"x3\":range(16, 11, - 1)})\n",
    "data2 = pd.DataFrame({\"ID\":range(104, 108),                              \n",
    "                      \"y1\":[\"x\", \"y\", \"x\", \"y\"],                      \n",
    "                      \"y2\":range(8, 1, - 2)})\n",
    "data3 = pd.DataFrame({\"ID\":range(102, 110),                           \n",
    "                      \"z1\":range(10, 18),                      \n",
    "                      \"z2\":[\"z\", \"b\", \"z\", \"z\", \"d\", \"z\", \"d\", \"a\"],                      \n",
    "                      \"z3\":range(18, 10, - 1)})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "8543997a",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>y1</th>\n",
       "      <th>y2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>104</td>\n",
       "      <td>4</td>\n",
       "      <td>d</td>\n",
       "      <td>13</td>\n",
       "      <td>x</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>105</td>\n",
       "      <td>5</td>\n",
       "      <td>e</td>\n",
       "      <td>12</td>\n",
       "      <td>y</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    ID  x1 x2  x3 y1  y2\n",
       "0  104   4  d  13  x   8\n",
       "1  105   5  e  12  y   6"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merge_inner_df = pd.merge(data1, data2, how='inner')\n",
    "merge_inner_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "63c67854",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>y1</th>\n",
       "      <th>y2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>101</td>\n",
       "      <td>1.0</td>\n",
       "      <td>a</td>\n",
       "      <td>16.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>102</td>\n",
       "      <td>2.0</td>\n",
       "      <td>b</td>\n",
       "      <td>15.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>103</td>\n",
       "      <td>3.0</td>\n",
       "      <td>c</td>\n",
       "      <td>14.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>104</td>\n",
       "      <td>4.0</td>\n",
       "      <td>d</td>\n",
       "      <td>13.0</td>\n",
       "      <td>x</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>105</td>\n",
       "      <td>5.0</td>\n",
       "      <td>e</td>\n",
       "      <td>12.0</td>\n",
       "      <td>y</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>106</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>x</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>107</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>y</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    ID   x1   x2    x3   y1   y2\n",
       "0  101  1.0    a  16.0  NaN  NaN\n",
       "1  102  2.0    b  15.0  NaN  NaN\n",
       "2  103  3.0    c  14.0  NaN  NaN\n",
       "3  104  4.0    d  13.0    x  8.0\n",
       "4  105  5.0    e  12.0    y  6.0\n",
       "5  106  NaN  NaN   NaN    x  4.0\n",
       "6  107  NaN  NaN   NaN    y  2.0"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merge_outer_df = pd.merge(data1, data2, how='outer')\n",
    "merge_outer_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "16bd32a4",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>y1</th>\n",
       "      <th>y2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>101</td>\n",
       "      <td>1</td>\n",
       "      <td>a</td>\n",
       "      <td>16</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>102</td>\n",
       "      <td>2</td>\n",
       "      <td>b</td>\n",
       "      <td>15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>103</td>\n",
       "      <td>3</td>\n",
       "      <td>c</td>\n",
       "      <td>14</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>104</td>\n",
       "      <td>4</td>\n",
       "      <td>d</td>\n",
       "      <td>13</td>\n",
       "      <td>x</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>105</td>\n",
       "      <td>5</td>\n",
       "      <td>e</td>\n",
       "      <td>12</td>\n",
       "      <td>y</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    ID  x1 x2  x3   y1   y2\n",
       "0  101   1  a  16  NaN  NaN\n",
       "1  102   2  b  15  NaN  NaN\n",
       "2  103   3  c  14  NaN  NaN\n",
       "3  104   4  d  13    x  8.0\n",
       "4  105   5  e  12    y  6.0"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merge_left_df = pd.merge(data1, data2, how='left')\n",
    "merge_left_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "b75c16ef",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>y1</th>\n",
       "      <th>y2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>104</td>\n",
       "      <td>4.0</td>\n",
       "      <td>d</td>\n",
       "      <td>13.0</td>\n",
       "      <td>x</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>105</td>\n",
       "      <td>5.0</td>\n",
       "      <td>e</td>\n",
       "      <td>12.0</td>\n",
       "      <td>y</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>106</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>x</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>107</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>y</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    ID   x1   x2    x3 y1  y2\n",
       "0  104  4.0    d  13.0  x   8\n",
       "1  105  5.0    e  12.0  y   6\n",
       "2  106  NaN  NaN   NaN  x   4\n",
       "3  107  NaN  NaN   NaN  y   2"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merge_right_df = pd.merge(data1, data2, how='right')\n",
    "merge_right_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "42bd7863",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>y1</th>\n",
       "      <th>y2</th>\n",
       "      <th>z1</th>\n",
       "      <th>z2</th>\n",
       "      <th>z3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>101</td>\n",
       "      <td>1.0</td>\n",
       "      <td>a</td>\n",
       "      <td>16.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>102</td>\n",
       "      <td>2.0</td>\n",
       "      <td>b</td>\n",
       "      <td>15.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>10.0</td>\n",
       "      <td>z</td>\n",
       "      <td>18.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>103</td>\n",
       "      <td>3.0</td>\n",
       "      <td>c</td>\n",
       "      <td>14.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11.0</td>\n",
       "      <td>b</td>\n",
       "      <td>17.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>104</td>\n",
       "      <td>4.0</td>\n",
       "      <td>d</td>\n",
       "      <td>13.0</td>\n",
       "      <td>x</td>\n",
       "      <td>8.0</td>\n",
       "      <td>12.0</td>\n",
       "      <td>z</td>\n",
       "      <td>16.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>105</td>\n",
       "      <td>5.0</td>\n",
       "      <td>e</td>\n",
       "      <td>12.0</td>\n",
       "      <td>y</td>\n",
       "      <td>6.0</td>\n",
       "      <td>13.0</td>\n",
       "      <td>z</td>\n",
       "      <td>15.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>106</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>x</td>\n",
       "      <td>4.0</td>\n",
       "      <td>14.0</td>\n",
       "      <td>d</td>\n",
       "      <td>14.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>107</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>y</td>\n",
       "      <td>2.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>z</td>\n",
       "      <td>13.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>108</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>16.0</td>\n",
       "      <td>d</td>\n",
       "      <td>12.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>109</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.0</td>\n",
       "      <td>a</td>\n",
       "      <td>11.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    ID   x1   x2    x3   y1   y2    z1   z2    z3\n",
       "0  101  1.0    a  16.0  NaN  NaN   NaN  NaN   NaN\n",
       "1  102  2.0    b  15.0  NaN  NaN  10.0    z  18.0\n",
       "2  103  3.0    c  14.0  NaN  NaN  11.0    b  17.0\n",
       "3  104  4.0    d  13.0    x  8.0  12.0    z  16.0\n",
       "4  105  5.0    e  12.0    y  6.0  13.0    z  15.0\n",
       "5  106  NaN  NaN   NaN    x  4.0  14.0    d  14.0\n",
       "6  107  NaN  NaN   NaN    y  2.0  15.0    z  13.0\n",
       "7  108  NaN  NaN   NaN  NaN  NaN  16.0    d  12.0\n",
       "8  109  NaN  NaN   NaN  NaN  NaN  17.0    a  11.0"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merge_outer_df = pd.merge(data1, data2, how='outer')\n",
    "merge_outer_df = pd.merge(merge_outer_df, data3, how='outer')\n",
    "\n",
    "merge_outer_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "ae70a8a2",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>y1</th>\n",
       "      <th>y2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>104</td>\n",
       "      <td>4</td>\n",
       "      <td>d</td>\n",
       "      <td>13</td>\n",
       "      <td>x</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>105</td>\n",
       "      <td>5</td>\n",
       "      <td>e</td>\n",
       "      <td>12</td>\n",
       "      <td>y</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    ID  x1 x2  x3 y1  y2\n",
       "0  104   4  d  13  x   8\n",
       "1  105   5  e  12  y   6"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merge_inner_df = pd.merge(data1, data2, how='inner', on='ID')\n",
    "merge_inner_df"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2b877859",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 任务9：Pandas透视表和交叉表操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "c1a3d8b3",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df = pd.read_csv('https://cdn.coggle.club/Pokemon.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "87552d18",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>index</th>\n",
       "      <th>HP_mean</th>\n",
       "      <th>Attack_mean</th>\n",
       "      <th>Defense_mean</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>(Bug, Electric)</td>\n",
       "      <td>60.000000</td>\n",
       "      <td>62.000000</td>\n",
       "      <td>55.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>(Bug, Fighting)</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>155.000000</td>\n",
       "      <td>95.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>(Bug, Fire)</td>\n",
       "      <td>70.000000</td>\n",
       "      <td>72.500000</td>\n",
       "      <td>60.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>(Bug, Flying)</td>\n",
       "      <td>63.000000</td>\n",
       "      <td>70.142857</td>\n",
       "      <td>61.571429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>(Bug, Ghost)</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>90.000000</td>\n",
       "      <td>45.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>131</th>\n",
       "      <td>(Water, Ice)</td>\n",
       "      <td>90.000000</td>\n",
       "      <td>83.333333</td>\n",
       "      <td>113.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>132</th>\n",
       "      <td>(Water, Poison)</td>\n",
       "      <td>61.666667</td>\n",
       "      <td>68.333333</td>\n",
       "      <td>58.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>133</th>\n",
       "      <td>(Water, Psychic)</td>\n",
       "      <td>87.000000</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>104.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>134</th>\n",
       "      <td>(Water, Rock)</td>\n",
       "      <td>70.750000</td>\n",
       "      <td>82.750000</td>\n",
       "      <td>112.750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>135</th>\n",
       "      <td>(Water, Steel)</td>\n",
       "      <td>84.000000</td>\n",
       "      <td>86.000000</td>\n",
       "      <td>88.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>136 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                index    HP_mean  Attack_mean  Defense_mean\n",
       "0     (Bug, Electric)  60.000000    62.000000     55.000000\n",
       "1     (Bug, Fighting)  80.000000   155.000000     95.000000\n",
       "2         (Bug, Fire)  70.000000    72.500000     60.000000\n",
       "3       (Bug, Flying)  63.000000    70.142857     61.571429\n",
       "4        (Bug, Ghost)   1.000000    90.000000     45.000000\n",
       "..                ...        ...          ...           ...\n",
       "131      (Water, Ice)  90.000000    83.333333    113.333333\n",
       "132   (Water, Poison)  61.666667    68.333333     58.333333\n",
       "133  (Water, Psychic)  87.000000    73.000000    104.000000\n",
       "134     (Water, Rock)  70.750000    82.750000    112.750000\n",
       "135    (Water, Steel)  84.000000    86.000000     88.000000\n",
       "\n",
       "[136 rows x 4 columns]"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 统计Type 1和Type 2分组下HP,Attack,Defense的均值\n",
    "result_list = []\n",
    "for index, group in df.groupby(['Type 1', 'Type 2']):\n",
    "    counts = group[['HP','Attack','Defense']].mean()\n",
    "    result_list.append({\n",
    "        'index': index,\n",
    "        'HP_mean': counts['HP'],\n",
    "        'Attack_mean': counts['Attack'],\n",
    "        'Defense_mean': counts['Defense'],\n",
    "    })\n",
    "result_df = pd.DataFrame(result_list)\n",
    "result_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "c2990f68",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>Type 2</th>\n",
       "      <th>Bug</th>\n",
       "      <th>Dark</th>\n",
       "      <th>Dragon</th>\n",
       "      <th>Electric</th>\n",
       "      <th>Fairy</th>\n",
       "      <th>Fighting</th>\n",
       "      <th>Fire</th>\n",
       "      <th>Flying</th>\n",
       "      <th>Ghost</th>\n",
       "      <th>Grass</th>\n",
       "      <th>Ground</th>\n",
       "      <th>Ice</th>\n",
       "      <th>Normal</th>\n",
       "      <th>Poison</th>\n",
       "      <th>Psychic</th>\n",
       "      <th>Rock</th>\n",
       "      <th>Steel</th>\n",
       "      <th>Water</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Type 1</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Bug</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>62.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>155.000000</td>\n",
       "      <td>72.500000</td>\n",
       "      <td>70.142857</td>\n",
       "      <td>90.0</td>\n",
       "      <td>73.833333</td>\n",
       "      <td>62.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>68.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>56.666667</td>\n",
       "      <td>114.714286</td>\n",
       "      <td>30.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Dark</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>85.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>82.500000</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>92.200000</td>\n",
       "      <td>80.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>107.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Dragon</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>150.0</td>\n",
       "      <td>110.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>120.000000</td>\n",
       "      <td>135.666667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>112.000000</td>\n",
       "      <td>140.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Electric</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>95.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>58.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>90.000000</td>\n",
       "      <td>50.0</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>46.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>55.000000</td>\n",
       "      <td>65.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fairy</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>45.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fighting</th>\n",
       "      <td>NaN</td>\n",
       "      <td>124.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>92.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>66.666667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>127.500000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fire</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>130.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>109.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>95.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>93.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>59.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>49.500000</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>90.000000</td>\n",
       "      <td>110.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Flying</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>50.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ghost</th>\n",
       "      <td>NaN</td>\n",
       "      <td>92.000000</td>\n",
       "      <td>110.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>41.666667</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>81.400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>53.750000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grass</th>\n",
       "      <td>NaN</td>\n",
       "      <td>95.000000</td>\n",
       "      <td>110.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47.000000</td>\n",
       "      <td>109.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>61.200000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>109.000000</td>\n",
       "      <td>95.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>70.533333</td>\n",
       "      <td>67.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>72.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ground</th>\n",
       "      <td>NaN</td>\n",
       "      <td>90.333333</td>\n",
       "      <td>85.0</td>\n",
       "      <td>66.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>180.000000</td>\n",
       "      <td>110.000000</td>\n",
       "      <td>99.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>55.000000</td>\n",
       "      <td>118.333333</td>\n",
       "      <td>135.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ice</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>70.000000</td>\n",
       "      <td>80.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>93.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>60.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Normal</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>45.000000</td>\n",
       "      <td>132.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>73.041667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>56.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>78.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>85.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Poison</th>\n",
       "      <td>50.0</td>\n",
       "      <td>82.000000</td>\n",
       "      <td>75.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>83.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>71.666667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>97.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>60.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Psychic</th>\n",
       "      <td>NaN</td>\n",
       "      <td>160.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>46.666667</td>\n",
       "      <td>160.000000</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>62.500000</td>\n",
       "      <td>110.0</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Rock</th>\n",
       "      <td>110.0</td>\n",
       "      <td>149.000000</td>\n",
       "      <td>105.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>103.333333</td>\n",
       "      <td>129.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>123.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>61.000000</td>\n",
       "      <td>81.333333</td>\n",
       "      <td>68.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>75.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>49.666667</td>\n",
       "      <td>75.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Steel</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>120.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>90.000000</td>\n",
       "      <td>90.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>97.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>90.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Water</th>\n",
       "      <td>NaN</td>\n",
       "      <td>120.000000</td>\n",
       "      <td>107.5</td>\n",
       "      <td>48.0</td>\n",
       "      <td>35.000000</td>\n",
       "      <td>79.666667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>56.571429</td>\n",
       "      <td>50.0</td>\n",
       "      <td>50.000000</td>\n",
       "      <td>84.400000</td>\n",
       "      <td>83.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>68.333333</td>\n",
       "      <td>73.000000</td>\n",
       "      <td>82.750000</td>\n",
       "      <td>86.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Type 2      Bug        Dark  Dragon  Electric       Fairy    Fighting  \\\n",
       "Type 1                                                                  \n",
       "Bug         NaN         NaN     NaN      62.0         NaN  155.000000   \n",
       "Dark        NaN         NaN    85.0       NaN         NaN   82.500000   \n",
       "Dragon      NaN         NaN     NaN     150.0  110.000000         NaN   \n",
       "Electric    NaN         NaN    95.0       NaN   58.000000         NaN   \n",
       "Fairy       NaN         NaN     NaN       NaN         NaN         NaN   \n",
       "Fighting    NaN  124.000000     NaN       NaN         NaN         NaN   \n",
       "Fire        NaN         NaN   130.0       NaN         NaN  109.000000   \n",
       "Flying      NaN         NaN    50.0       NaN         NaN         NaN   \n",
       "Ghost       NaN   92.000000   110.0       NaN         NaN         NaN   \n",
       "Grass       NaN   95.000000   110.0       NaN   47.000000  109.000000   \n",
       "Ground      NaN   90.333333    85.0      66.0         NaN         NaN   \n",
       "Ice         NaN         NaN     NaN       NaN         NaN         NaN   \n",
       "Normal      NaN         NaN     NaN       NaN   45.000000  132.000000   \n",
       "Poison     50.0   82.000000    75.0       NaN         NaN   83.500000   \n",
       "Psychic     NaN  160.000000     NaN       NaN   46.666667  160.000000   \n",
       "Rock      110.0  149.000000   105.0       NaN  103.333333  129.000000   \n",
       "Steel       NaN         NaN   120.0       NaN   90.000000   90.000000   \n",
       "Water       NaN  120.000000   107.5      48.0   35.000000   79.666667   \n",
       "\n",
       "Type 2          Fire      Flying  Ghost       Grass      Ground         Ice  \\\n",
       "Type 1                                                                        \n",
       "Bug        72.500000   70.142857   90.0   73.833333   62.000000         NaN   \n",
       "Dark       80.000000   92.200000   80.0         NaN         NaN  107.500000   \n",
       "Dragon    120.000000  135.666667    NaN         NaN  112.000000  140.000000   \n",
       "Electric   65.000000   90.000000   50.0   65.000000         NaN   65.000000   \n",
       "Fairy            NaN   45.000000    NaN         NaN         NaN         NaN   \n",
       "Fighting         NaN   92.000000    NaN         NaN         NaN         NaN   \n",
       "Fire             NaN   95.333333    NaN         NaN   93.333333         NaN   \n",
       "Flying           NaN         NaN    NaN         NaN         NaN         NaN   \n",
       "Ghost      41.666667   65.000000    NaN   81.400000         NaN         NaN   \n",
       "Grass            NaN   61.200000    NaN         NaN  109.000000   95.333333   \n",
       "Ground    180.000000  110.000000   99.0         NaN         NaN         NaN   \n",
       "Ice              NaN   70.000000   80.0         NaN   93.333333         NaN   \n",
       "Normal           NaN   73.041667    NaN   80.000000   56.000000         NaN   \n",
       "Poison           NaN   71.666667    NaN         NaN   97.000000         NaN   \n",
       "Psychic   100.000000   62.500000  110.0  100.000000         NaN         NaN   \n",
       "Rock             NaN  123.000000    NaN   61.000000   81.333333   68.000000   \n",
       "Steel            NaN   80.000000   97.5         NaN  105.000000         NaN   \n",
       "Water            NaN   56.571429   50.0   50.000000   84.400000   83.333333   \n",
       "\n",
       "Type 2    Normal     Poison     Psychic        Rock       Steel       Water  \n",
       "Type 1                                                                       \n",
       "Bug          NaN  68.333333         NaN   56.666667  114.714286   30.000000  \n",
       "Dark         NaN        NaN   73.000000         NaN  105.000000         NaN  \n",
       "Dragon       NaN        NaN  100.000000         NaN         NaN         NaN  \n",
       "Electric    46.5        NaN         NaN         NaN   55.000000   65.000000  \n",
       "Fairy        NaN        NaN         NaN         NaN         NaN         NaN  \n",
       "Fighting     NaN        NaN   66.666667         NaN  127.500000         NaN  \n",
       "Fire        59.0        NaN   49.500000   50.000000   90.000000  110.000000  \n",
       "Flying       NaN        NaN         NaN         NaN         NaN         NaN  \n",
       "Ghost        NaN  53.750000         NaN         NaN         NaN         NaN  \n",
       "Grass        NaN  70.533333   67.500000         NaN   72.000000         NaN  \n",
       "Ground       NaN        NaN   55.000000  118.333333  135.000000         NaN  \n",
       "Ice          NaN        NaN   40.000000         NaN         NaN   60.000000  \n",
       "Normal       NaN        NaN   78.500000         NaN         NaN   85.000000  \n",
       "Poison       NaN        NaN         NaN         NaN         NaN   60.000000  \n",
       "Psychic      NaN        NaN         NaN         NaN         NaN         NaN  \n",
       "Rock         NaN        NaN   75.000000         NaN   49.666667   75.333333  \n",
       "Steel        NaN        NaN   89.000000   90.000000         NaN         NaN  \n",
       "Water        NaN  68.333333   73.000000   82.750000   86.000000         NaN  "
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 统计Type 1为index，Type 2取值为不同列的情况下，Attack的均值\n",
    "tmp_df = df.copy()\n",
    "new_df = pd.pivot_table(tmp_df, index='Type 1', columns='Type 2', values='Attack')\n",
    "new_df"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e75523f6",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 任务10：Pandas性能优化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "afe7a864",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1001</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1002</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1003</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1004</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999995</th>\n",
       "      <td>1995</td>\n",
       "      <td>995</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999996</th>\n",
       "      <td>1996</td>\n",
       "      <td>996</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999997</th>\n",
       "      <td>1997</td>\n",
       "      <td>997</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999998</th>\n",
       "      <td>1998</td>\n",
       "      <td>998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999999</th>\n",
       "      <td>1999</td>\n",
       "      <td>999</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000000 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          x1   x2\n",
       "0       1000    0\n",
       "1       1001    1\n",
       "2       1002    2\n",
       "3       1003    3\n",
       "4       1004    4\n",
       "...      ...  ...\n",
       "999995  1995  995\n",
       "999996  1996  996\n",
       "999997  1997  997\n",
       "999998  1998  998\n",
       "999999  1999  999\n",
       "\n",
       "[1000000 rows x 2 columns]"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.DataFrame({    \n",
    "    \"x1\":list(range(1000, 2000))*1000,              \n",
    "    \"x2\":list(range(1000))*1000})\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "e58422c9",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|█████████████████████████████████████████████████████████████████████| 1000000/1000000 [00:55<00:00, 17935.45it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Wall time: 56.2 s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "1000000"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%time\n",
    "result = []\n",
    "for i in tqdm(range(len(data)),total=len(data)):\n",
    "    row = data.iloc[i]\n",
    "    result.append(d)\n",
    "len(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "368788ea",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|███████████████████████████████████████████████████████████████████| 1000000/1000000 [00:00<00:00, 1288738.95it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Wall time: 1.26 s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "1000000"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%time\n",
    "result = []\n",
    "for row in tqdm(data.itertuples(),total=len(data)):\n",
    "    result.append(row)\n",
    "len(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "d45dcab4",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|█████████████████████████████████████████████████████████████████████| 1000000/1000000 [00:42<00:00, 23323.16it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Wall time: 42.9 s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "1000000"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%time\n",
    "result = []\n",
    "for index, row in tqdm(data.iterrows(),total=len(data)):\n",
    "    result.append(row)\n",
    "len(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "600ecf52",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
